package com.blog.mapper;

import com.blog.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * 用户数据的Mapper
 *
 * @author 黄嘉强
 */
@Mapper
public interface UserMapper {

    /**
     * 基于用户名查询用户的密码。昵称
     * @param username 用户名
     * @return 返回User对象
     */
    @Select("select password, nick from user where username=#{username}")
    User selectByUsername(String username);
}
